package manager.user;

import common.db.*;
import common.main.*;
import java.util.*;

public class UserListBean extends MainBean
{
	public void funcExecute() throws Exception
	{
		String sort = (String)inputTable.get("sort");
		String section = (String)inputTable.get("section");
		String word = (String)inputTable.get("word");
		queryBuffer = new StringBuffer("");
		queryBuffer.append("SELECT ID, PASS, NAME, REG_ID, JUMIN1||'-'||JUMIN2 JUMIN, TO_CHAR(REG_DATE, 'YYYY-MM-DD') REG_DATE, USEYN, ADMINYN FROM SMEMBER ");	
		
		if(word.length() > 0)
		{
			if(section.equals("TC"))
			{
				queryBuffer.append("WHERE ID LIKE '%" + word + "%'  ");
			}
			else if(section.equals("TT"))
			{
				queryBuffer.append("WHERE NAME LIKE '%" + word + "%' ");
			}	
		}
		queryBuffer.append("ORDER BY " + sort);
		
		DBExecute dbe = new DBExecute(queryBuffer.toString());	
		outputList = dbe.getDataList();

	}
}